export interface IEvents {
	[event: string]: string;
}

export interface IActions {
	[atom: string]: (...args: any[]) => Promise<unknown> | unknown;
}

export interface IFeidaoAi {
	readonly data: {
		readonly [attr: string]: any;
	};
	fire(action: string, ...args: any[]): Promise<unknown>;
	emit(event: string, ...args: any[]): Promise<unknown>;
}

export interface IFeidaoAiWeappAppData {
	readonly [attr: string]: unknown;
	readonly app: wx.App;
	inner_audio_context?: wx.InnerAudioContext;
	background_audio_manager?: wx.BackgroundAudioManager;
	record_manager?: wx.RecorderManager;
	video_context?: wx.VideoContext;
	camera_context?: wx.CameraContext;
}

export interface IFeidaoAiWeappPage extends IFeidaoAi {
	page: unknown;
	readonly data: {
		readonly [attr: string]: any;
		readonly spaceid: string;
		readonly page: wx.Page;
		readonly params: { [name: string]: string; };
		readonly fd: IFeidaoAiWeappAppData;
	};
}

export interface IFeidaoAiWeappApp extends IFeidaoAi {
	readonly data: IFeidaoAiWeappAppData;
}
